<%--
  Created by IntelliJ IDEA.
  User: zzz
  Date: 2020/2/10
  Time: 15:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8" />
    <title>最家</title>
    <link rel="stylesheet" type="text/css" href="${APP_PATH}/portal/css/public.css"/>
    <link rel="stylesheet" type="text/css" href="${APP_PATH}/portal/css/myorder.css" />
</head>
<body>
<!------------------------------head------------------------------>
<jsp:include page="/WEB-INF/jsps/Portal/common/top.jsp"/>
<!------------------------------idea------------------------------>
<div class="address">
    <div class="wrapper clearfix">
        <a href="#" class="fl">首页</a>
        <span>/</span>
        <a href="${APP_PATH}/toUser">个人中心</a>
        <span>/</span>
        <a href="${APP_PATH}/toMyOrder" class="on">我的订单</a>
    </div>
</div>

<!------------------------------Bott------------------------------>
<div class="Bott">
    <div class="wrapper clearfix">
        <jsp:include page="/WEB-INF/jsps/Portal/common/nav.jsp"/>
        <div class="you fl">
            <div class="my clearfix">
                <h2 class="fl">我的订单</h2>
                <a href="#" class="fl">请谨防钓鱼链接或诈骗电话，了解更多&gt;</a>
            </div>
            <div class="dlist clearfix">
                <ul id="nav" class="fl clearfix">
                    <li><a href="javascript:;" onclick="showOrder('all')">全部有效订单</a></li>
                    <li><a href="javascript:;" onclick="showOrder('get')">待发货</a></li>
                    <li><a href="javascript:;" onclick="showOrder('wait')">待收货</a></li>
                </ul>
                <form action="" method="get" class="fr clearfix">
                    <input type="text" name="likeName" id="likeName" value="" placeholder="请输入商品名称、订单号" />
                    <input type="button" onclick="search()"  />
                </form>
            </div>
                <jsp:include page="/WEB-INF/jsps/Portal/myOrder/allOrder.jsp"/>
                <jsp:include page="/WEB-INF/jsps/Portal/myOrder/getOrder.jsp"/>
                <jsp:include page="/WEB-INF/jsps/Portal/myOrder/waitOrder.jsp"/>

        </div>
    </div>
</div>
<!--返回顶部-->
<jsp:include page="/WEB-INF/jsps/Portal/common/gotop.jsp"/>
<!--footer-->
<jsp:include page="/WEB-INF/jsps/Portal/common/bottom.jsp"/>
<script src="${APP_PATH}/portal/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="${APP_PATH}/portal/js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="${APP_PATH}/portal/js/user.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
<script>
    $(function () {
        $("#getPaging").hide();
        $("#waitPaging").hide();
        $("#nav").find("a").first().css("color","#CC0000");
        $("#nav").find("a").click(function () {
            $("#nav").find("a").css("color","");
            $(this).css("color","#CC0000");
        });
    });

    function search() {
        $("#allOrder").show();
        $("#allPaging").show();
        $("#getOrder").hide();
        $("#getPaging").hide();
        $("#waitOrder").hide();
        $("#waitPaging").hide();
        allOrder(1);
    }

    function showOrder(type) {

        if(type == 'all'){
            $("#allOrder").show();
            $("#allPaging").show();
            $("#getOrder").hide();
            $("#getPaging").hide();
            $("#waitOrder").hide();
            $("#waitPaging").hide();
        }else if(type == 'get'){
            $("#getOrder").show();
            $("#getPaging").show();
            $("#allOrder").hide();
            $("#allPaging").hide();
            $("#waitOrder").hide();
            $("#waitPaging").hide();
        }else if(type == 'wait'){
            $("#waitOrder").show();
            $("#waitPaging").show();
            $("#allOrder").hide();
            $("#allPaging").hide();
            $("#getOrder").hide();
            $("#getPaging").hide();
        }
    }
</script>